export default {
  getUserInfo (state, userInfo) {
    state.userInfo = Object.assign(state.userInfo, userInfo);

    let flag = false;
    if ((typeof state.userInfo.vip_over).toLocaleLowerCase() === 'string') {
      let time = state.userInfo.vip_over.replace(/-/g, '/');
      flag = new Date(time).getTime() > new Date().getTime() ? true : false;
    }
    state.isVip = flag;
  },
  getCompany (state, company) {
    state.company = Object.assign(state.company, company);
  },
  getHonorList (state, honorList) {
    if (honorList != '0') {
      state.honorList = [...honorList];
    }
  },
  getPhotoList (state, photoList) {
    if (photoList != '0') {
      state.photoList = [...photoList];
    }
  },
  getVideoList (state, videoList) {
    if (videoList != '0') {
      state.videoList = [...videoList];
    }
  },
  getVideoUrlList (state, videoUrlList) {
    if (videoUrlList != '0') {
      state.videoUrlList = [...videoUrlList];
    }
  },
  getMusicList (state, musicList) {
    if (musicList != '0') {
      state.musicList = [...musicList];
    }
  },
  getCurrentUrl (state, currentUrl) {
    state.currentUrl = currentUrl;
  },
  getAppId (state, appId) {
    state.appId = appId;
  },
}
